<html>
 <head>
  <link href="./leetcode-problem.css" rel="stylesheet" type="text/css">
 </head>
 <body>
  <div class="question_difficulty">
   难度：Easy
  </div>
  <div>
   <h1 class="question_title">
    953. Reverse Only Letters
   </h1>
   <p>
    Given a string
    <code>
     S
    </code>
    , return the "reversed" string where all characters that are not a letter&nbsp;stay in the same place, and all letters reverse their positions.
   </p>
   <p>
    &nbsp;
   </p>
   <div>
    <div>
     <div>
      <ol>
      </ol>
     </div>
    </div>
   </div>
   <div>
    <p>
     <strong>
      Example 1:
     </strong>
    </p>
    <pre>
<strong>Input: </strong><span id="example-input-1-1">"ab-cd"</span>
<strong>Output: </strong><span id="example-output-1">"dc-ba"</span>
</pre>
    <div>
     <p>
      <strong>
       Example 2:
      </strong>
     </p>
     <pre>
<strong>Input: </strong><span id="example-input-2-1">"a-bC-dEf-ghIj"</span>
<strong>Output: </strong><span id="example-output-2">"j-Ih-gfE-dCba"</span>
</pre>
     <div>
      <p>
       <strong>
        Example 3:
       </strong>
      </p>
      <pre>
<strong>Input: </strong><span id="example-input-3-1">"Test1ng-Leet=code-Q!"</span>
<strong>Output: </strong><span id="example-output-3">"Qedo1ct-eeLg=ntse-T!"</span>
</pre>
      <p>
       &nbsp;
      </p>
      <div>
       <p>
        <strong>
         <span>
          Note:
         </span>
        </strong>
       </p>
       <ol>
        <li>
         <code>
          S.length &lt;= 100
         </code>
        </li>
        <li>
         <code>
          33 &lt;= S[i].ASCIIcode &lt;= 122
         </code>
         &nbsp;
        </li>
        <li>
         <code>
          S
         </code>
         doesn't contain
         <code>
          \
         </code>
         or
         <code>
          "
         </code>
        </li>
       </ol>
      </div>
     </div>
    </div>
   </div>
  </div>
  <div>
   <h1 class="question_title">
    953. 仅仅反转字母
   </h1>
   <p>
    给定一个字符串&nbsp;
    <code>
     S
    </code>
    ，返回&nbsp;&ldquo;反转后的&rdquo;&nbsp;字符串，其中不是字母的字符都保留在原地，而所有字母的位置发生反转。
   </p>
   <p>
    &nbsp;
   </p>
   <ol>
   </ol>
   <p>
    <strong>
     示例 1：
    </strong>
   </p>
   <pre><strong>输入：</strong>"ab-cd"
<strong>输出：</strong>"dc-ba"
</pre>
   <p>
    <strong>
     示例 2：
    </strong>
   </p>
   <pre><strong>输入：</strong>"a-bC-dEf-ghIj"
<strong>输出：</strong>"j-Ih-gfE-dCba"
</pre>
   <p>
    <strong>
     示例 3：
    </strong>
   </p>
   <pre><strong>输入：</strong>"Test1ng-Leet=code-Q!"
<strong>输出：</strong>"Qedo1ct-eeLg=ntse-T!"
</pre>
   <p>
    &nbsp;
   </p>
   <p>
    <strong>
     提示：
    </strong>
   </p>
   <ol>
    <li>
     <code>
      S.length &lt;= 100
     </code>
    </li>
    <li>
     <code>
      33 &lt;= S[i].ASCIIcode &lt;= 122
     </code>
     &nbsp;
    </li>
    <li>
     <code>
      S
     </code>
     中不包含&nbsp;
     <code>
      \
     </code>
     or
     <code>
      "
     </code>
    </li>
   </ol>
  </div>
 </body>
</html>